const account = require('../model/account');


async function validateAccount(accountInfo) {
    const result = await account.find(accountInfo);
    return Boolean(result && result.length === 1)
}


function addCount(accountInfo) {
    return account.create(accountInfo);
}

module.exports = {
    validateAccount,
    addCount
}